package main 
import "fmt"

type Person struct {
	name string
	age int
	gender string
}

func (p Person) printInfo() {
	fmt.Printf("我是%v，今年%v岁，我是%v的。\n", p.name, p.age, p.gender)
}

func(p Person) setName(name string) {
	p.name = name
}

func main() {
	var p1 = Person{name: "张三", age: 18, gender: "男"}
	var p2 = p1 
	var p3 = &p1
	p2.name = "李四"
	p3.name = "王五"
	p1.printInfo()
	p2.printInfo()
	p3.printInfo()
}